<?php
if(isset($_SESSION[sess_login])){
	$_SESSION['isupload']=false;
	if (isset($_GET['id'])){
		$id = $_GET['id'];
		include("./module/connect.php");
		$sql = 'select `id`, `name`, `path` FROM `photo_album` WHERE `ID` = '.$id.' AND `owner` = '.$_SESSION[sess_login]['id'];
		$result = @mysql_query($sql, $conn);
	
		if (@mysql_num_rows($result)=="1"){
			$row = @mysql_fetch_row($result); 
				$id = $row[0];
				$name = $row[1];
				$path = '../'.IMAGE_FOLDER_TUONGDOI.'/'.$_SESSION[sess_login]['id'].'-'.$_SESSION[sess_login]['username'].'/'.$row[2];
		}
		@mysql_free_result($result);
		mysql_close($conn);
?>
  <fieldset>
    <legend> STEP 2 </legend> 
<form onsubmit="return false;" name="form_step_2" id="form_step_2">
<input type="hidden" value="2" name="step_name">
<input type="hidden" value="<?=$id ?>" name="idalbum">
</form>
    <table width="100%" border="0" cellpadding="5" cellspacing="5">
      <tr>
        <td width="121" height="25" align="right" valign="middle">Album Title:  &nbsp;</td>
        <td valign="middle" align="left">&nbsp; <span class="username_red"><?=$name ?></span></td>
      </tr>
      <tr>
        <td align="right" valign="top"><div style="margin-top:10px;">Upload images:  &nbsp;</div></td>
        <td valign="top">
        <?php
            if(file_exists('./module/photo/STEP/index.php'))
            require ('./module/photo/STEP/index.php');
            else echo "Không thể chạy chương trình tải ảnh. Xin liên hệ với Quản trị";
          ?>
    	</td>
      </tr>
      <tr>
        <td width="121" height="25" align="right" valign="middle">&nbsp;</td>
        <td valign="middle" align="left"><span class="note">
        &nbsp; * Maximum for one file size is 5 Mb <br />
        &nbsp; * You can choose multi-files to upload (unlimit)<br />
        &nbsp; * You can skip this step but in the next step you cannot select an icon for your album <br />
        &nbsp; * Don't close you browser or click "Next step" when uploading<br />
</span></td>
      </tr>
      <tr>
        <td width="121" height="25" align="right" valign="middle">&nbsp;</td>
        <td valign="middle" align="left">&nbsp;<input type="button" name="Button" value=" &nbsp; Step 3 >>&nbsp;" onclick="javascript:$('#form_step_2').submit();">

</td>
      </tr>
    </table>
    </fieldset>
<?php
	}
	else {
		echo "ERROR Cannot get information.";
	}
}
?>